<clr-modal [(clrModalOpen)]="showVersionInfo" [clrModalClosable]=true>
  <h3 class="modal-title">版本信息</h3>
  <div class="modal-body">
    <ul class="list-unstyled">
      <li><b>版本:</b>&nbsp;{{version.version}}</li>
      <li><b>版权: </b>&nbsp;Copyright (c) 2014-2020 FIT2CLOUD 飞致云</li>
    </ul>
  </div>

</clr-modal>
<app-password></app-password>
<clr-header class="header-6" [ngStyle]="{'background-color':'#2b415a'}">
  <div class="branding">
    <img src="assets/images/logo-white.png" height="40px" style="margin-top: 10px">
  </div>
  <div class="header-actions">
    <clr-dropdown>
      <button class="nav-icon" clrDropdownTrigger aria-label="toggle settings menu" style="color: red">
        <clr-icon class="is-solid" shape="bell" [ngClass]="{'has-badge':info>0 || warning>0}"></clr-icon>
      </button>
      <clr-dropdown-menu *clrIfOpen clrPosition="bottom-right">
        <a clrDropdownItem (click)="toMessage()">信息 &nbsp;<span class="badge badge-info">{{info}}</span></a>
        <a clrDropdownItem (click)="toMessage()">告警 &nbsp;<span class="badge badge-danger">{{warning}}</span></a>
      </clr-dropdown-menu>
    </clr-dropdown>
    <clr-dropdown>
      <button class="nav-icon" clrDropdownTrigger aria-label="toggle settings menu">
        <clr-icon shape="help" class="is-inverse" size="24"></clr-icon>
        <clr-icon shape="caret down"></clr-icon>
      </button>
      <clr-dropdown-menu *clrIfOpen clrPosition="bottom-right">
        <a href="https://docs.kubeoperator.io" target="_blank" clrDropdownItem>帮助</a>
        <a href="javascript:void(0)" (click)="showInfo()" clrDropdownItem>关于</a>
      </clr-dropdown-menu>
    </clr-dropdown>
    <clr-dropdown class="dropdown">
      <button class="nav-text" clrDropdownToggle>
        <clr-icon shape="user" class="is-inverse" size="24"></clr-icon>
        <span>{{username}}</span>
        <clr-icon shape="caret down"></clr-icon>
      </button>
      <clr-dropdown-menu [clrPosition]="'bottom-right'">
        <a href="javascript:void(0)" clrDropdownItem *ngIf="profile.source ==='local'"
           (click)="changePassword()">修改密码</a>
        <a href="javascript:void(0)" clrDropdownItem (click)="logOut()">退出登录</a>
      </clr-dropdown-menu>
    </clr-dropdown>
  </div>
</clr-header>

